﻿using Windows.Storage.Pickers;

namespace Sidvall.UI.Uwp.Dialogs
{
    public static class PickerManager
    {
        #region GetPickerLocationId

        public static PickerLocationId GetPickerLocationId(Sidvall.IO.FolderType? type)
        {
            if (type == null)
                return PickerLocationId.ComputerFolder;
            switch (type.Value)
            {
                case IO.FolderType.InstalledLocation:
                    return PickerLocationId.HomeGroup;

                case IO.FolderType.LocalApplicationData:
                    return PickerLocationId.HomeGroup;
                case IO.FolderType.RoamingApplicationData:
                    return PickerLocationId.HomeGroup;
                case IO.FolderType.TemporaryApplicationData:
                    return PickerLocationId.HomeGroup;

                case IO.FolderType.Desktop:
                    return PickerLocationId.Desktop;
                case IO.FolderType.MyDocuments:
                    return PickerLocationId.DocumentsLibrary;
                case IO.FolderType.MyMusic:
                    return PickerLocationId.MusicLibrary;
                case IO.FolderType.MyPictures:
                    return PickerLocationId.PicturesLibrary;
                case IO.FolderType.MyVideos:
                    return PickerLocationId.VideosLibrary;
                default:
                    throw new System.ArgumentException(nameof(type));
            }
        }

        #endregion
        #region GetPickerViewMode

        public static PickerViewMode GetPickerViewMode(string filter)
        {
            return PickerViewMode.List;
        }

        #endregion
    }
}
